package com.example.arch;

import android.arch.lifecycle.Lifecycle;
import android.arch.lifecycle.LifecycleObserver;
import android.arch.lifecycle.OnLifecycleEvent;
import android.util.Log;

/**
 * Created by zhangwei on 2017/6/26.
 */
public class MyLifeCycle implements LifecycleObserver {
    @OnLifecycleEvent(Lifecycle.Event.ON_RESUME)
    public void start() {
        Log.e("s", "MyLifeCycle start on resume()");
    }
    @OnLifecycleEvent(Lifecycle.Event.ON_PAUSE)
    public void stop() {
        Log.e("s", "MyLifeCycle stop on pause()");

    }
}
